﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using G15_Agent.BUS;

namespace G15_Agent.Helpers.ServiceHelpers.TransportServiceHelpers
{
    public class G07TransportService : TransportService
    {
        public G07TransportService(string serviceID, string defaultUsername, string defaultPassword)
        {
            ServiceID = serviceID;
            DefaultUsername = defaultUsername;
            DefaultPassword = defaultPassword;
        }

        protected override bool CallSpecificServiceLogin(string username, string password)
        {
            return BUS_Manager.transport.DangNhap_G07(username, password);
        }

        public override List<Models.Transport.LoaiXe> IGetTransportType()
        {
            return BUS_Manager.transport.LayDanhSachLoaiXe_G07();
        }

        public override List<Models.Transport.BangGiaXeDuLich> IRetrieveFeeByRegion(string region)
        {
            return BUS_Manager.transport.LayBangGiaXeDuLichTheoMien_G07(region);
        }

        public override List<Models.Transport.BangGiaTheoGio> IRetrieveFeeByService(string service)
        {
            return BUS_Manager.transport.BangGiaTheoDichVu_G07(service);
        }

        public override List<string> IRetrieveRegionList()
        {
            return BUS_Manager.transport.LayDanhSachMien_G07();
        }

        public override List<Models.Transport.LoTrinh> IRetrieveRoute()
        {
            return BUS_Manager.transport.LayDanhSachLoTrinh_G07();
        }

        public override List<Models.Transport.LoaiXe> IRetrieveVehicleList()
        {
            return BUS_Manager.transport.LayDanhSachLoaiXe_G07();
        }

        public override List<string> IGetVehicleBrand()
        {
            return BUS_Manager.transport.LayDanhSachHieuXe_G07();
        }

        public override List<Models.Transport.ChiTietXe> ISearchBySeat(string numberOfSeat)
        {
            return BUS_Manager.transport.TimXeTheoSoCho_G07(numberOfSeat);
        }

        public override List<Models.Transport.ChiTietXe> ISearchByTypeOfService(string serviceType)
        {
            return BUS_Manager.transport.TimXeTheoDichVu_G07(serviceType);
        }

        public override List<string> IGetSeatOption()
        {
            return new List<string> { "4-5", "7", "16", "29", "35", "45"};
        }

        public override List<string> IGetServiceType()
        {
            //return new List<string>
            //{
            //    @"Xe Cưới",
            //    @"Xe Du Lịch",
            //    @"Xe Hạng Sang",
            //    @"Xe Ngoại Tỉnh",
            //    @"Xe Sân Bay",
            //    @"Xe Tháng",
            //};
            return BUS_Manager.transport.LayDanhSachDichVu_G07();
        }

        public override List<Models.Transport.LoaiXe> ISearchForTransportation
            (string region, string classID, string numberOfSeat, string service)
        {
            return BUS_Manager.transport.TimXeTheoTieuChi_G07(region, classID, numberOfSeat, service);
        }

        public override int? IBookingForTransportation(string verhicleName, string service, DateTime departDate, DateTime returnDate, int driver, int numberOfSeat)
        {
            return BUS_Manager.transport.DatXe_G07(verhicleName, service, departDate, returnDate, driver, numberOfSeat);
        }
    }
}